package com;

import com.spring.TestApplicationContext;
import com.xrc.AppConfig;
import com.xrc.service.UserService;

/**
 * @ClassName:Test
 * @Auther: xierongchang
 * @Description:
 * @Date: 2024/6/6 22:22
 * @Version: v1.0.0
 */
public class Test {

    public static void main(String[] args) {
        // 创建非lazy单例bean
        TestApplicationContext applicationContext = new TestApplicationContext(AppConfig.class);

        UserService userService = (UserService) applicationContext.getBean("userService");
//        System.out.println(applicationContext.getBean("userService"));
//        System.out.println(applicationContext.getBean("userService"));
//        System.out.println(applicationContext.getBean("userService"));
//        System.out.println(applicationContext.getBean("orderService"));
//        System.out.println(applicationContext.getBean("orderService"));
        userService.test();
    }
}
